package neuroBot.gui;

import java.io.File;

import javax.swing.JFileChooser;
import javax.swing.JFrame;

public abstract class GuiUtil {

	public static String chooseFolder(String title) {
		JFileChooser jfc = new JFileChooser();
		jfc.setCurrentDirectory(new File("."));
		jfc.setDialogTitle(title);
		jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

		int returnVal;
		do {
			returnVal = jfc.showOpenDialog(new JFrame());
		} while (returnVal != JFileChooser.APPROVE_OPTION);
		return jfc.getSelectedFile().getPath();
	}
}
